import * as actionTypes from './constances'
const defaultState={
    singerList:[],
    enterLoading:true,
    pullUpLoading:false,
    pullDownLoading:false,
    pageCount:0
}


export default (state=defaultState,action)=>{
    switch(action.type){
        case actionTypes.CHANGE_SINGER_LIST:
            return {
                ...state,
                singerList:action.data
            }
        case actionTypes.CHANGE_ENTER_LOADING:
            return{
                ...state,
                enterLoading:action.data
            }
        case actionTypes.CHANGE_PULLUP_LOADING:
            return {
                ...state,
                pullUpLoading:action.data
            }
        case actionTypes.CHANGE_PULLDOWN_LOADING:
            return {
                ...state,
                pullDownLoading:action.data
            }
        case actionTypes.CHANGE_PAGE_COUNT:
            return {
                ...state,
                pageCount:action.data
            }
        default:
            return state
    }
}